package com.arron.DesignMode.builder;

/**
 * @Classname com.arron.DesignMode.builder.HouseDirector
 * @Date 2020/11/6 16:52
 * @Created by 刘
 */
public class HouseDirector {

    private HouseBuilder houseBuilder;

    public HouseDirector(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    public void setHouseBuilder(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    public House buildHouses(){
        houseBuilder.buildBasic();
        houseBuilder.buildWalls();
        houseBuilder.buildRoof();
        return houseBuilder.getHouse();
    }
}
